<?php

$this->menu=array(
	array('label'=>'Manage Distribution', 'url'=>array('admin')),
);
?>

<h1>Generate Distribution</h1>

<?php if(Yii::app()->user->hasFlash('distribution')): ?>

<div class="flash-notice">
	<?php echo Yii::app()->user->getFlash('distribution'); ?>
</div>

<?php endif; ?>


<div class="form">
    <?php echo CHtml::beginForm(); ?>

    <p class="note"><?php echo 'Fields with <span class="required">*</span> are required.'; ?></p>


    <div class="row">
        <?php echo CHtml::label('Distribution Date', 'distributiondate'); ?>
        <?php
            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'name' => 'distributiondate',
                // additional javascript options for the date picker plugin
                'options' => array(
                    'showAnim' => 'fold',
                    'dateFormat'=>'dd/mm/yy',
                ),
                'htmlOptions' => array(
                    'style' => 'height:20px;'
                ),
                'value' => Yii::app()->dateFormatter->format('dd/MM/yyyy', time())
            ));
        ?>
    </div>


    <div class="row submit">
        <?php //echo CHtml::submitButton(UserModule::t("Login")); ?>
        <?php
            echo CHTML::button('Generate', array('submit' => Yii::app()->createUrl("distribution/generate")));
        ?>
    </div>

    <?php echo CHtml::endForm(); ?>
</div><!-- form -->
